package com.etime.shycourse.services.coupons.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.etime.shycourse.services.coupons.interfaces.CouponactivetypeServices;
import com.etime.shycourse.dao.CouponactivetypeMapper;
import com.etime.shycourse.pojo.Couponactivetype;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : CouponactivetypeServicesImpl  //类名
 * @Description :   //描述
 * @Author : W //作者
 * @Date: 2022/3/21  13:40
 */
@Service
public class CouponactivetypeServicesImpl implements CouponactivetypeServices {
    @Autowired
    private CouponactivetypeMapper mapper;

    @Override
    public Couponactivetype selectById(Integer typeId) {
        return mapper.selectById (typeId);
    }

    /**
     * 查询 所有可用的活动类型
     *
     * @return List<Couponactivetype>
     */
    @Override
    public List<Couponactivetype> selectAll() {
        return mapper.selectList (new QueryWrapper<Couponactivetype> ().eq ("activetypestate", 1));
    }
}

